package com.pinxixi.content.service;

import com.pinxixi.content.mapper.ContentCategoryMapper;
import com.pinxixi.framework.domain.content.ContentCategory;
import com.pinxixi.framework.model.response.CommonCode;
import com.pinxixi.framework.model.response.ListResponseResult;
import com.pinxixi.framework.model.response.QueryResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ContentCategoryService {

    @Autowired
    private ContentCategoryMapper contentCategoryMapper;

    public ListResponseResult<ContentCategory> findAll() {
        List<ContentCategory> list = contentCategoryMapper.findAll();
        QueryResult queryResult = new QueryResult();
        queryResult.setList(list);
        return new ListResponseResult<ContentCategory>(CommonCode.SUCCESS,queryResult);
    }
}
